//
//  GYConfigureLoginViewController.m
//  Visitor
//
//  Created by x on 2017/9/12.
//  Copyright © 2017年 HLB. All rights reserved.
//

#import "GYConfigureLoginViewController.h"

@interface GYConfigureLoginViewController ()
/** ip地址 */
@property (weak, nonatomic) IBOutlet UITextField *iPTextFiled;

/** 端口号 */
@property (weak, nonatomic) IBOutlet UITextField *portTextFiled;

@end

@implementation GYConfigureLoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"登入配置";
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"完成" style:UIBarButtonItemStylePlain target:self action:@selector(rightBtuClick)];
}


/**
 导航栏右侧按钮点击事件
 */
- (void)rightBtuClick {
    NSLog(@"%s",__FUNCTION__);
    if (_iPTextFiled.text.length != 0 || _portTextFiled.text.length != 0) {
        
        [self.delegate ConfigureLoginInfomationSuccess:_iPTextFiled.text port:_portTextFiled.text];
    }else {
        [SVProgressHUD showImage:nil status:@"配置信息有误,请重新配置!"];
    }
}
@end
